package com.ruoyi.ora.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单对象 ora_order
 * 
 * @author liuwp
 * @date 2024-11-14
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 订单类型 */
    @Excel(name = "订单类型", dictType = "ora_order_type")
    private Integer orderType;

    @Excel(name = "订单标题")
    private String orderTitle;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal orderAmount;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private BigDecimal refundFee;

    /** 优惠金额  */
    @Excel(name = "优惠金额 ")
    private BigDecimal discountAmount;

    /** 订单状态 */
    @Excel(name = "订单状态", dictType = "ora_order_status")
    private Integer status;

    /** 流水号 */
    @Excel(name = "流水号")
    private String serialNumber;

    /** 第三方订单号 */
    @Excel(name = "第三方订单号")
    private String outTradeNo;

    /** 交易id */
    @Excel(name = "交易id")
    private String transactionId;

    /** 支付通道 */
    @Excel(name = "支付通道", dictType = "ora_pay_channel")
    private Integer payChannel;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 退款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deleteTime;

    /** 乐观锁 */
    @Excel(name = "乐观锁")
    private String optimismLock;

    /** 币种 */
    private String currency;
    /** 产品id */
    private Long productId;
    private String purchaseToken;

    /** 设备id */
    @Excel(name = "设备id")
    private Long deviceId;

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getPurchaseToken() {
        return purchaseToken;
    }

    public void setPurchaseToken(String purchaseToken) {
        this.purchaseToken = purchaseToken;
    }

    public String getOrderTitle() {
        return orderTitle;
    }

    public void setOrderTitle(String orderTitle) {
        this.orderTitle = orderTitle;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setOrderType(Integer orderType) 
    {
        this.orderType = orderType;
    }

    public Integer getOrderType() 
    {
        return orderType;
    }
    public void setOrderAmount(BigDecimal orderAmount) 
    {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount() 
    {
        return orderAmount;
    }
    public void setRefundFee(BigDecimal refundFee) 
    {
        this.refundFee = refundFee;
    }

    public BigDecimal getRefundFee() 
    {
        return refundFee;
    }
    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setSerialNumber(String serialNumber) 
    {
        this.serialNumber = serialNumber;
    }

    public String getSerialNumber() 
    {
        return serialNumber;
    }
    public void setOutTradeNo(String outTradeNo) 
    {
        this.outTradeNo = outTradeNo;
    }

    public String getOutTradeNo() 
    {
        return outTradeNo;
    }
    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }
    public void setPayChannel(Integer payChannel) 
    {
        this.payChannel = payChannel;
    }

    public Integer getPayChannel() 
    {
        return payChannel;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setRefundTime(Date refundTime) 
    {
        this.refundTime = refundTime;
    }

    public Date getRefundTime() 
    {
        return refundTime;
    }
    public void setDeleteTime(Date deleteTime) 
    {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime() 
    {
        return deleteTime;
    }
    public void setOptimismLock(String optimismLock) 
    {
        this.optimismLock = optimismLock;
    }

    public String getOptimismLock() 
    {
        return optimismLock;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("orderType", getOrderType())
            .append("orderAmount", getOrderAmount())
            .append("refundFee", getRefundFee())
            .append("discountAmount", getDiscountAmount())
            .append("status", getStatus())
            .append("serialNumber", getSerialNumber())
            .append("outTradeNo", getOutTradeNo())
            .append("transactionId", getTransactionId())
            .append("payChannel", getPayChannel())
            .append("userId", getUserId())
            .append("createTime", getCreateTime())
            .append("payTime", getPayTime())
            .append("refundTime", getRefundTime())
            .append("deleteTime", getDeleteTime())
            .append("remark", getRemark())
            .append("optimismLock", getOptimismLock())
            .toString();
    }
}
